package com.taobao.api.request;

import com.taobao.api.internal.mapping.ApiField;
import com.taobao.api.TaobaoObject;
import java.util.Map;

import com.taobao.api.ApiRuleException;
import com.taobao.api.BaseTaobaoRequest;
import com.taobao.api.internal.util.TaobaoHashMap;
import com.taobao.api.internal.util.json.JSONWriter;
import com.taobao.api.response.TmallNrFulfillCancelResponse;

/**
 * TOP API: tmall.nr.fulfill.cancel request
 * 
 * @author top auto create
 * @since 1.0, 2018.07.25
 */
public class TmallNrFulfillCancelRequest extends BaseTaobaoRequest<TmallNrFulfillCancelResponse> {
	
	

	/** 
	* 入参
	 */
	private String req;

	public void setReq(String req) {
		this.req = req;
	}

	public void setReq(NrCancelFulfillReqDto req) {
		this.req = new JSONWriter(false,true).write(req);
	}

	public String getReq() {
		return this.req;
	}

	public String getApiMethodName() {
		return "tmall.nr.fulfill.cancel";
	}

	public Map<String, String> getTextParams() {		
		TaobaoHashMap txtParams = new TaobaoHashMap();
		txtParams.put("req", this.req);
		if(this.udfParams != null) {
			txtParams.putAll(this.udfParams);
		}
		return txtParams;
	}

	public Class<TmallNrFulfillCancelResponse> getResponseClass() {
		return TmallNrFulfillCancelResponse.class;
	}

	public void check() throws ApiRuleException {
	}
	
	/**
 * 入参
 *
 * @author top auto create
 * @since 1.0, null
 */
public static class NrCancelFulfillReqDto extends TaobaoObject {

	private static final long serialVersionUID = 7122465775883941438L;

	/**
		 * 取消类型。操作人类型:1寄件人,3客服小二,4快递员, 5CP, 6收件人,8门店取消,100系统
		 */
		@ApiField("cancel_oper_type")
		private Long cancelOperType;
		/**
		 * 操作取消人员ID号
		 */
		@ApiField("cancel_oper_user_id")
		private Long cancelOperUserId;
		/**
		 * 操作取消人员姓名
		 */
		@ApiField("cancel_oper_user_name")
		private String cancelOperUserName;
		/**
		 * 取消原因的说明
		 */
		@ApiField("cancel_reason")
		private String cancelReason;
		/**
		 * 取消的对应编码
		 */
		@ApiField("cancel_reason_code")
		private Long cancelReasonCode;
		/**
		 * 淘宝交易的主订单号
		 */
		@ApiField("main_order_id")
		private Long mainOrderId;
		/**
		 * 淘宝商家的sellerID
		 */
		@ApiField("seller_id")
		private Long sellerId;
	

	public Long getCancelOperType() {
			return this.cancelOperType;
		}
		public void setCancelOperType(Long cancelOperType) {
			this.cancelOperType = cancelOperType;
		}
		public Long getCancelOperUserId() {
			return this.cancelOperUserId;
		}
		public void setCancelOperUserId(Long cancelOperUserId) {
			this.cancelOperUserId = cancelOperUserId;
		}
		public String getCancelOperUserName() {
			return this.cancelOperUserName;
		}
		public void setCancelOperUserName(String cancelOperUserName) {
			this.cancelOperUserName = cancelOperUserName;
		}
		public String getCancelReason() {
			return this.cancelReason;
		}
		public void setCancelReason(String cancelReason) {
			this.cancelReason = cancelReason;
		}
		public Long getCancelReasonCode() {
			return this.cancelReasonCode;
		}
		public void setCancelReasonCode(Long cancelReasonCode) {
			this.cancelReasonCode = cancelReasonCode;
		}
		public Long getMainOrderId() {
			return this.mainOrderId;
		}
		public void setMainOrderId(Long mainOrderId) {
			this.mainOrderId = mainOrderId;
		}
		public Long getSellerId() {
			return this.sellerId;
		}
		public void setSellerId(Long sellerId) {
			this.sellerId = sellerId;
		}

}


}